$(function () {

    $("body").css("opacity","1")

    $("#xiugaixinxi").click(function(){
        console.log(1);
        $(this).css({"background-color":"#007dd2","color":"white"})
        $("#zhucexinxi").css({"background-color":"white","color":"black"})
        $("#zcxxt").hide(500)
        $("#xgxxt").show(500)
    });

    $("#zhucexinxi").click(function(){
        console.log(1);
        $(this).css({"background-color":"#007dd2","color":"white"})
        $("#xiugaixinxi").css({"background-color":"white","color":"black"})
        $("#zcxxt").show(500)
        $("#xgxxt").hide(500)
    });

	var username = localStorage.getItem("username");
	

	
	
	$.post("/xjxt/gerenxinxi?username="+ username +"",function(res){
    	
		var hehe = JSON.parse(res);
    	console.log(hehe);
    	$("#knumber").html(hehe[0].knumber);
    	$("#xnumber").html(hehe[0].xnumber);
    	$("#name").html(hehe[0].name);
    	$("#sex").html(hehe[0].sex);
    	$("#birthday").html(hehe[0].birthday);
    	$("#ID").html(hehe[0].ID);
    	$("#nation").html(hehe[0].nation);
    	$("#school").html(hehe[0].school);
    	$("#nschool").html(hehe[0].nschool);
    	$("#cengci").html(hehe[0].cengci);
    	$("#xuezhi").html(hehe[0].xuezhi);
    	$("#peiyang").html(hehe[0].peiyang);
    	$("#leibie").html(hehe[0].leibie);
    	$("#inday").html(hehe[0].inday);
    	$("#zhuangtai").html(hehe[0].zhuangtai);
    	$("#oldname").html(hehe[0].oldname);
    	$("#class1").html(hehe[0].class1);
    	$("#nianji").html(hehe[0].nianji);
    	$("#byyear").html(hehe[0].byyear);
    	$("#inschool").html(hehe[0].inschool);
    	$("#zhuanye").html(hehe[0].zhuanye);
    	$("#fangx").html(hehe[0].fangx);
    	$("#address").html(hehe[0].address);
    	$("#name1").html(hehe[0].name);
    	$("#xnumber1").html(hehe[0].xnumber);
    	$("#mingzu").val(hehe[0].nation1);
    	$("#jiguan3").val(hehe[0].jiguan);
    	$("#tongxun3").val(hehe[0].tongxun);
    	$("#youjian3").val(hehe[0].youjian);
    	$("#dianhua3").val(hehe[0].dianhua);
    	$("#username").val(hehe[0].username);
    	$("#touxiang").attr("src",hehe[0].touxiang);
    });
    
});